<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        //定义数组
        var arr = [3,4,5,6,7];
        var arr2 = new Array();

        /*console.log(arr[1])
        arr[arr.length] = 100;
        console.log(arr)*/

        /*for(i=0; i<arr.length; i++){
            console.log(arr[i])
        }*/
        //i是下标
        /*for(i in arr){
            console.log(arr[i])
        }*/


        //item 元素
        /*for(item of arr){
            console.log(item)
        }*/

        //i是下标，v是元素
        arr.forEach((v,i) => {
            console.log(i + ":" + v)
        })
    </script>
</head>
<body>

</body>
</html>